import React, { Component } from 'react'
// 事件对象 --- 和 原生 使用上 没有不同
export default class App extends Component {
 
  constructor (props) {
    super(props)
    this.clickHandlerFn = this.clickHandler.bind(this)
    this.state = {
      count: 10
    }
  }
  clickHandler (e) {
    console.log(e)
    this.setState({
      count: this.state.count + 100
    })
  }
  render() {
    return (
      <div>
        <button onClick ={ this.clickHandlerFn }>加</button>{ this.state.count }
      </div>
    )
  }
}
